package com.mall4jcola.cloud.tunnel.database.dataobj;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.mall4jcola.cloud.core.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

/**
 * @author hmxchen
 */
@Data
@Entity
@Table(name = "user_basic")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
@EqualsAndHashCode(callSuper = true)
public class UserBasicDO extends BaseEntity {
    /**
     * 用户ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "user_id")
    private Long userId;
    /**
     * 用户名
     */
    @Column(name = "user_name", nullable = false, length = 100)
    private String userName;
    /**
     * 用户状态（1：正常，2：封禁 3：永久封禁）
     */
    @Column(name = "status",nullable = false)
    private Integer status;
    /**
     * 封禁结束时间
     */
    @Column(name = "times")
    private Date times;
    /**
     * 用户类型见SysTypeEnum 0.普通用户系统 1.商家端 2平台端
     */
    @Column(name = "sysType",nullable = false)
    private Integer sysType;
    /**
     *用户昵称
     */
    @Column(name = "nick_name", nullable = false, length = 100)
    private String nickName;
    /**
     *头像图片路径
     */
    @Column(name = "pic")
    private String pic;
    /**
     *性别(1：未知 2：男：3：女)
     */
    @Column(name = "sex", nullable = false, length = 4)
    private Integer sex;
    /**
     *出生年月
     */
    @Column(name = "birth")
    private Date birth;

}
